<? /*
**************************************************
*	Crisses Mailinglist	       					 *
**************************************************
|                                                |
|   See install.txt for copyright & license info.|
-------------------------------------------------
*/ ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><? echo $title; ?></title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
		<div class="container">
		<div class="Table_01">
	<div class="header_">
		<img id="header" src="images/header.gif" width="830" height="51" alt="" />
		<div id="headline">
			<h1><? echo $title; ?></h1>
		</div>
	</div>
	<div class="background_">
	</div>


<? 
include("config.php");
$language = "languages/".$language.".php";
include($language);
error_reporting(0);



$page = explode('=', $_SERVER['QUERY_STRING']);


if(($page[1] == 1)||!isset($page[1])){


	$display_block =  $l_installwelcome;
	$display_block .= "<br/><a href=\"install.php?p=2\">".$l_next."</a>";

}elseif($page[1] == 2){
	$conn = mysql_connect($address, $username, $sql_password);
	mysql_select_db($db, $conn)or $error1 = mysql_error();

	
	$sql = "CREATE TABLE `".$prefix."activation` (
	  `id` int(10) unsigned NOT NULL auto_increment,
	  `email` varchar(45) NOT NULL default '',
	  `timestamp` varchar(45) NOT NULL default '',
	  `key` varchar(45) NOT NULL default '',
	  PRIMARY KEY  (`id`))";
	  
	 $result1 = mysql_query($sql, $conn)or $error2 = mysql_error();
	 
	 $sql = "CREATE TABLE `".$prefix."subscribers` (
	  `id` int(10) unsigned NOT NULL auto_increment,
	  `email` varchar(45) NOT NULL default '',
	  `date` varchar(45) NOT NULL default '',
	  PRIMARY KEY  (`id`))";
	  
	$result2 = mysql_query($sql, $conn)or $error3 = mysql_error();
	
	if(($result1)&&($result2)){
	
		$display_block = $l_installationsucces;
	
	}else{
	
		$display_block = $l_installerror;
		$display_block .= "<font color=red><br/><b>";
		$display_block .= $error1."<br/>";
		$display_block .= $error2."<br/>";
		$display_block .= $error3."<br/>";
		$display_block .= "</b></font><br/>";
	}
}



?>
<div class="content_"><? echo $display_block; ?></div>	<div class="footer_">
		<img id="footer" src="images/footer.gif" width="830" height="6" alt="" />
	</div><div class="copyright_">&copy; 2006 <a href="http://code.google.com/p/crissesmailinglist/">Crisses Mailinglist</a> <? include_once "version.php"; echo $xes_version;?></div>
</div></div>

</body>
</html>
